import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;
import java.awt.*;

/**
 * 多轮游戏的计分板，目前没用
 */
public class ScoreBoard extends JPanel {
    int MyScore =  0;
    int RivalScore = 0;
    String ScoreM = String.valueOf(MyScore);
    String ScoreR = String.valueOf(RivalScore);
    String HtmlHead = "<html>";
    String HtmlTail = "</html>";
    String br = "<br>";
    String Delimiter = "-------";
    JLabel myScore;
    JLabel rivalScore;

    /**
     * 计分板实例
      */
    public static ScoreBoard Instance = new ScoreBoard();

    /**
     * 创建计分板
     */
    public ScoreBoard(){
        Border blackLine = BorderFactory.createLineBorder(Color.BLACK);
        Font font = new Font(null,Font.BOLD,25);
        myScore = new JLabel(ScoreM,SwingConstants.CENTER);
        rivalScore = new JLabel(ScoreR,SwingConstants.CENTER);
        myScore.setFont(font);
        myScore.setBounds(0,0,80,40);
        rivalScore.setFont(font);
        rivalScore.setBounds(0,42,80,40);
        setLayout(null);
        add(rivalScore);
        JLabel Line = new JLabel();
        Line.setBounds(0,41,79,1);
        Line.setBorder(blackLine);
        add(Line);
        add(myScore);
        setVisible(true);
        setBounds(50,30,80,80);
        setBorder(BorderFactory.createEtchedBorder());
    }
}
